<template>
  <img alt="java" src="/img/java.png" :[woh]="figure" :class="box" :title="slogan" @click="changeAttr">
  <img alt="computerroom" :src="pic" :[woh]="figure" :class="box" :title="slogan" @click="changeAttr" v-if="condition">
  <img alt="Vue logo" src="/img/python.png" :[woh]="figure" :class="box" :title="slogan" @click="changeAttr">
  <br>
  <span v-if="weekDay % 7 == 1">星期一</span>
  <span v-else-if="weekDay % 7 == 2">星期二</span>
  <span v-else-if="weekDay % 7 == 3">星期三</span>
  <span v-else-if="weekDay % 7 == 4">星期四</span>
  <span v-else-if="weekDay % 7 == 5">星期五</span>
  <span v-else-if="weekDay % 7 == 6">星期六</span>
  <span v-else>星期日</span>

</template>

<script>

export default {
  name: 'App',
  data() {
    return {
      pic: '/img/computerroom.png',
      woh: 'width',
      figure: 300,
      box: 'box',
      slogan: '桃李不言下自成蹊',
      condition: false,
      weekDay: 3
    }
  },
  methods: {
    changeAttr() {
      this.woh = this.woh == 'width' ? 'height' : 'width'
    }
  }
}
</script>

<style>
.box {
  border-radius: 50%;
}

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
